package com.lly.bigdata.bgayx.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 组织机构
 * </p>
 *
 * @author lly
 * @since 2020-10-21
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value = "SysOrg对象", description = "组织机构")
public class SysOrg implements Serializable {

    private static final long serialVersionUID = 1L;
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    @ApiModelProperty(value = "名称")
    @NotBlank(message = "不能为空！")
    private String orgName;

    @ApiModelProperty(value = "岗位编码")
    @NotBlank(message = "不能为空！")
    private String orgCode;

    @ApiModelProperty(value = "父id")
    @NotBlank(message = "不能为空！")
    private String pid;

    @ApiModelProperty(value = "创建时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    @ApiModelProperty(value = "创建人")
    private String createBy;

    @ApiModelProperty(value = "排序")
    private Integer orgSort;

    private String status = "1";
    @ApiModelProperty(value = "是不是子节点")
    private String treeLeaf;
    @ApiModelProperty(value = "树级别")
    private Integer treeLevel;


}
